package com.ysw.mapper;

import com.ysw.annotation.*;
import com.ysw.entity.Student;
import org.apache.ibatis.annotations.Param;

public interface SQLMapper {
    @ExtSelect("select * from user where stuname=#{stuname}")
    Student selectUser(@ExtParam("stuname") String stuname);

    @ExtInsert("insert into user(stuname,age) values(#{stuname},#{age})")
    int insertUser(@ExtParam("age") Integer age, @ExtParam("stuname") String stuname);

    @ExtDelete("delete from user where id = #{id} ")
    void deleteUser(@ExtParam("id") Integer id);

    @ExtUpdate("update user set age = #{age}  where id = #{id} ")
    void updateUser(@ExtParam("age") Integer age, @ExtParam("id") Integer id);
}
